/**
 * @(#)RetentFilterDaoImpl.java 2017年7月3日
 * Copyright(C) 2017 ZHEXIN IT CO.,LTD. All rights reserved.
 */
package org.jsbd.boss.dao.impl;

import java.util.List;

import org.jsbd.boss.dao.IRetentFilterDao;
import org.jsbd.boss.domian.channel.MarkDayTask;
import org.jsbd.boss.domian.channel.RetentFilter;
import org.jsbd.boss.domian.channel.RetentTaskVo;
import org.springframework.stereotype.Service;

import edu.hziee.common.queue.IBatchExecutor;

/**
 * 过滤规则记录
 * 
 * @author <a href="mailto:xupengcheng@zhexinit.com" >徐鹏程</a>
 * @version 1.0.0
 */
@Service("retentFilterDao")
public class RetentFilterDaoImpl extends CrackLogBaseDao implements IRetentFilterDao {

	@Override
	public void insertRetentFilter(RetentFilter filter) {
		super.insert("qy_retent_filter.INSERT_RETENT_FILTER", filter);
	}
	
	@Override
	public void batchInsertRetentFilter(List<RetentFilter> filterList){
		super.batchInsert("qy_retent_filter.INSERT_RETENT_FILTER", filterList);
	}

	@Override
	public int deleteRetentFilter(RetentFilter filter) {
		return super.delete("qy_retent_filter.DELETE_RETENT_FILTER", filter);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.jsbd.boss.dao.IRetentFilterDao#selectRetentTaskInfoList(java.lang
	 * .Integer)
	 */
	@Override
	public List<RetentTaskVo> selectRetentTaskInfoList(RetentFilter filter) {
		return super.queryForList("qy_retent_filter.SELECT_RETENT_TASK_LIST", filter);
	}
	
	
	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.jsbd.boss.dao.IRetentFilterDao#selectRetentTaskInfoList(java.lang
	 * .Integer)
	 */
	@Override
	public List<RetentTaskVo> selectWeixinRetentTaskInfoList(RetentFilter filter) {
		return super.queryForList("qy_retent_filter.SELECT_WEIXIN_RETENT_TASK_LIST", filter);
	}

	
	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.jsbd.boss.dao.IRetentFilterDao#selectRetentTaskInfoList(java.lang
	 * .Integer)
	 */
	@Override
	public List<RetentTaskVo> selectWeiboRetentTaskInfoList(RetentFilter filter) {
		return super.queryForList("qy_retent_filter.SELECT_WEIBO_RETENT_TASK_LIST", filter);
	}


	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.jsbd.boss.dao.IRetentFilterDao#selectRetentMarkDayTask(java.lang.
	 * Integer, java.lang.String)
	 */
	@Override
	public List<MarkDayTask> selectRetentMarkDayTask(Integer day, String apk) {
		MarkDayTask taskDay = new MarkDayTask();
		taskDay.setMark(apk);
		taskDay.setDay(day.toString());
		return super.queryForList("qy_retent_filter.SELECT_RETENT_TASK_COUNT", taskDay);
	}

}
